#pragma once

#include <map>

#include "kconfig.h"

class StringPool
{
private:
	char *pool;
	int ptr;
	std::map<k_string, k_int> table;

public:
	StringPool() : pool(0), ptr(0) {}

	void Allocate(k_int poolSize);
	void AddString(const k_string &str);
	k_int GetStringAddress(const k_string &str);

	const char* GetPool() const;

	void CleanUp();
};
